﻿using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Linq;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Domain.Dummies.Dtos;

namespace KernelWorkflow.Activities
{
    public partial class AutorizationActivity : SequenceActivity
    {
        public AutorizationActivity()
        {
            InitializeComponent();
        }


        public static readonly string AuthorizationOnlyAccessObject = "AUTH";        
        

        public static DependencyProperty UserNameProperty = DependencyProperty.Register("UserName", typeof(string), typeof(AutorizationActivity));
        public static DependencyProperty PasswordProperty = DependencyProperty.Register("Password", typeof(string), typeof(AutorizationActivity));
        public static DependencyProperty SessionProperty  = DependencyProperty.Register("Session" , typeof(SessionDto), typeof(AutorizationActivity));

        [Category("AUTHORIZATION_INPUT")]
        [Browsable(true)]
        public string UserName
        {
            get
            {
                return ((string)(base.GetValue(AutorizationActivity.UserNameProperty)));
            }
            set
            {
                base.SetValue(AutorizationActivity.UserNameProperty, value);
            }
        }

        [Category("AUTHORIZATION_INPUT")]
        [Browsable(true)]
        public string Password
        {
            get
            {
                return ((string)(base.GetValue(AutorizationActivity.PasswordProperty)));
            }
            set
            {
                base.SetValue(AutorizationActivity.PasswordProperty, value);
            }
        }

        [Category("AUTHORIZATION_OUTPUT")]
        [Browsable(true)]
        public SessionDto Session
        {
            get
            {
                return ((SessionDto)(base.GetValue(AutorizationActivity.SessionProperty)));
            }
            set
            {
                base.SetValue(AutorizationActivity.SessionProperty, value);
            }
        }
    }
}
